/* Styles Généraux */

input,
select,
textarea {
	text-align: center;
}

/* 2. exception : champ recherche dans le header (desktop) */
.search-container input#miniSearchInput {
	text-align: left;
}

/* (optionnel) si tu veux laisser la recherche mobile alignée à gauche : */
.search-container-mobile input#mobileSearchInput {
	text-align: left;
}

.custom-gradient {
	background: linear-gradient(120deg, #667eea, #764ba2);
}

.cart-item:hover {
	background-color: rgba(243, 244, 246, 0.5);
}

@keyframes pulse {
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.1);
	}

	100% {
		transform: scale(1);
	}
}

.pulse {
	animation: pulse 0.3s ease;
}

.search-container {
	transition: all 0.3s ease;
}

.search-container:focus-within {
	box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

.one-line {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Styles Cartes de Jeu */
.game-card {
	transition: all 0.3s ease;
	overflow: hidden;
}

.game-image-container {
	position: relative;
	width: 100%;
	padding-top: 120%;
	overflow: hidden;
}

.game-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.game-card:hover .game-image {
	transform: scale(1.05);
}

.platform-badge {
	position: absolute;
	bottom: 8px;
	left: 8px;
	z-index: 2;
}

.price-tag {
	position: absolute;
	top: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.7);
	color: white;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: bold;
	z-index: 2;
}

@keyframes cardHover {
	0% {
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}

	100% {
		box-shadow: 0 10px 20px rgba(124, 58, 237, 0.2);
	}
}

.game-card:hover {
	animation: cardHover 0.3s forwards;
	transform: translateY(-5px);
}

/* Style Bouton Développeur */
#devLoginToggle {
	position: fixed;
	bottom: 1rem;
	right: 1rem;
	z-index: 1000;
}

/* Styles Modales */
@keyframes modalFadeIn {
	0% {
		opacity: 0;
		transform: translateY(20px) scale(0.98);
	}

	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.modal {
	transition: opacity 0.3s ease, visibility 0.3s ease;
	visibility: hidden;
}

.modal.active {
	visibility: visible;
	animation: modalFadeIn 0.3s ease-out forwards;
}

.modal-overlay {
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	transition: opacity 0.3s ease;
}

.modal:not(.opacity-100) .modal-overlay {
	opacity: 0;
}

.modal.opacity-100 .modal-overlay {
	opacity: 1;
}

/* Inputs Flottants */
.input-group {
	position: relative;
}

.input-group input,
.input-group select {
	transition: all 0.3s ease;
	padding-top: 1.25rem;
	padding-bottom: 0.75rem;
}

.input-group input:focus,
.input-group select:focus {
	border-color: #8b5cf6;
	box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.input-group label {
	transition: all 0.3s ease;
	position: absolute;
	/* MODIFIÉ: Position initiale centrée horizontalement */
	left: 50%;
	transform: translateX(-50%);
	/* Centrer horizontalement */
	/* FIN MODIFIÉ */
	top: 1rem;
	/* Correspond au py-3 de l'input */
	font-size: 1rem;
	/* Taille normale */
	color: #9ca3af;
	pointer-events: none;
	transform-origin: center;
	/* Origine de la transformation au centre */
}

.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label,
.input-group select:focus+label,
.input-group select:valid+label {
	/* La translation Y et le scale restent les mêmes */
	/* La translation X est déjà gérée par la position initiale */
	transform: translateX(-50%) translateY(-0.75rem) scale(0.85);
	/* Combiner les transformations */
	background: white;
	padding: 0 4px;
	color: #8b5cf6;
	font-size: 0.8rem;
	/* left: 0.75rem; */
	/* Supprimer ou commenter cette ligne, left: 50% est déjà défini */
}

.input-group select {
	color: #1f2937;
}

.input-group select:required:invalid {
	color: #9ca3af;
}

/* Boutons */
.btn-gradient {
	background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
	transition: all 0.3s ease;
}

.btn-gradient:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-gradient:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.btn-secondary {
	transition: all 0.3s ease;
}

.btn-secondary:hover {
	background-color: #f3f4f6;
}

/* Séparateur */
.separator {
	display: flex;
	align-items: center;
	text-align: center;
	color: #9ca3af;
	font-size: 0.875rem;
	margin: 1.5rem 0;
}

.separator::before,
.separator::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid #e5e7eb;
}

.separator::before {
	margin-right: 1rem;
}

.separator::after {
	margin-left: 1rem;
}

/* Spinner */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.spinner {
	animation: spin 1s linear infinite;
}

/* Style pour la liste des codes achetés */
.purchased-code-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px solid #e5e7eb;
}

.purchased-code-item:last-child {
	border-bottom: none;
}

/* Style pour l'indicateur de chargement principal */
.main-loading-indicator {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 300px;
}

/* Style pour les images légales dans la modale paiement */
.legal-image {
    min-width: 142px; /* LEGAL */
    min-height: 42px; /* LEGAL */
	height: auto;
	margin-top: 0.5rem;
}

.sva-image {
	max-width: 100%;
	min-height: 25px; /* LEGAL */
	height: auto;
	margin-top: 0.5rem;
}


#filterPriceMin, #filterPriceMax {width: 4.2em;}