html, body {
	width: 100%;
	min-height: 100%;
	margin: 0;
	padding: 0;
	background-color: #000; /* Garde le noir ici */
	overflow:hidden;
}

body::before {
	content: "";
	position: fixed; /* Fixed est mieux pour un fond qui ne bouge pas */
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: url('/images/fond.png') no-repeat center center;
	background-size: cover;
	opacity: 0.6;
	z-index: 0; /* On le remet à 0 */
}

main {
	position: relative; /* Change absolute en relative pour qu'il passe au-dessus du before */
	z-index: 1; /* Force le contenu à être au-dessus du fond */
	width: 100%;
	min-height: 100vh;
	font-family: Arial, sans-serif;
}

/* Loader */
#loader{
	position: fixed;
	inset: 0;
	background: white;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	z-index: 100;
}

.loader-bar-container {
	width: 200px;
	height: 10px;
	background: #eee;
	border-radius: 5px;
	overflow: hidden;
}

#loader-progress {
	width: 0%;
	height: 100%;
	background: #ff0000;
	transition: width 0.3s;
}

/*Booster */
#booster-pack , #cards-container{
	position:absolute;
  top:4%;
  left:4%;
  bottom:14%;
  right:4%;
}

#booster-pack{
	z-index:2;
}

#cards-container{
	z-index:1;
}

#booster-pack img{
	position:absolute;
	max-width:100%;
	max-height:100%;
	top:50%;
	left:50%;
	transform:translate(-50%,-50%);
}

.booster-wrapper {
	position: relative;
	width:100%; /* À ajuster selon la taille de ton image */
	height: 100%;
	margin: 0 auto;
	cursor: grab;
	user-select: none;
}

.booster-layer{
	pointer-events: none; /* Évite de bloquer le drag */
}

#booster-reveal-mask {
	position: absolute;
	top: 0;
	left: 0; /* On commence à droite */
	width: 100%; /* Totalement visible au début */
	height: 100%;
	overflow: hidden;
}

#booster-reveal-mask>div{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}


/* Booster Animation */
.hidden { display: none !important; }

.booster-anim {
	animation: zoomIn 1s ease-out forwards;
	text-align: center;
	cursor: pointer;
}

@keyframes zoomIn {
	from { transform: scale(0.5); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

#open-text {
	position:absolute;
	bottom:15%;
  left:50%;
  transform:translateX(-50%);
	width:auto;
	padding:10px;
	font-size:34px;
	color: white;
	margin-top: 10px;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
	animation: fadeIn 0.5s 1.2s forwards;
	opacity: 0;
}

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

/* Cartes *//* État initial de la carte (réduite) */
.card {
	position: absolute;
	top: 50%;
	left: 50%;
	/* Centrage + Réduction de 20% */
	transform: translate(-50%, -50%) scale(0.8); 
	opacity: 1;
	touch-action: none;
	user-select: none;
	-webkit-user-drag: none;
	max-height: 80%;
	max-width: 80%;
	cursor: grab;
	/* Ajout d'une transition fluide pour la croissance */
	transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s;
	z-index: 1;
}

/* État final une fois le booster parti */
.card.is-grown {
	transform: translate(-50%, -50%) scale(1);
}

/* On s'assure que pendant le drag, la classe is-grown reste active 
 mais que le JS peut surcharger le transform */
.card.dragging {
	transition: none;
}

/* Galerie finale */
#final-gallery {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	padding:20px 20px 100px 20px;
	overflow-y: auto;
	height: 100vh;
	width: 100%;
}

#final-gallery img {
	width: 250px;
	border-radius: 10px;
	box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}