/* === style.css === */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: linear-gradient(135deg, #6e8efb, #a777e3);
	min-height: 100vh;
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.container {
	max-width: 800px;
	width: 100%;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.95);
	padding: 30px;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	backdrop-filter: blur(10px);
}

.nav {
	display: flex;
	justify-content: space-between; /* ou space-around si vous préférez */
	align-items: center;
	padding: 10px 80px; /* Ajout de padding pour plus d'espace */
	background-color: rgba(
		255,
		255,
		255,
		0.9
	); /* Optionnel, si vous voulez un fond */
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Optionnel, pour un effet léger */
	margin-bottom: 20px;
	border-radius: 20px;
}

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

.logo a {
	text-decoration: none;
	color: #333;
	font-size: 1.5rem;
	font-weight: bold;
	display: flex;
	align-items: center;
}
.logo img {
	height: 90px; /* Ajustez la taille de l’image selon vos besoins */
	width: auto;
}

.logo a:hover {
	color: #6e8efb; /* Ajout d’un effet au survol */
}

h1 {
	text-align: center;
	margin: 0; /* Suppression de margin-bottom car maintenant dans .nav */
	color: #333;
	font-size: 2.2rem;
	background: linear-gradient(to right, #6e8efb, #a777e3);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	/* padding-bottom: 10px; */
	/* border-bottom: 2px solid #e0e0e0; */
}

.controls {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
}
.controls-font-width {
	display: flex;
	gap: 15px;
	justify-content: center;
	margin-bottom: 25px;
	flex-wrap: wrap;
}

/* Boutons communs pour controls et navigation */
.controls button,
.navigation button {
	padding: 12px 25px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	background: linear-gradient(to right, #6e8efb, #a777e3);
	color: white;
	border: none;
	border-radius: 50px;
	box-shadow: 0 4px 8px rgba(106, 142, 251, 0.3);
	transition: all 0.3s ease;
}

.controls button:hover,
.navigation button:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(106, 142, 251, 0.4);
}

.controls button:active,
.navigation button:active {
	transform: translateY(0);
}

/* Contrôleur de taille de police */
.controls label,
.controls input[type='range'],
.controls #fontSizeValue {
	margin: 0 5px;
	vertical-align: middle;
}

#fontSizeControl {
	width: 100px;
	height: 6px;
	cursor: pointer;
}
/* Bouton mélanger personnalisé */
#shuffleBtn {
	background: linear-gradient(to right, #ff9966, #ff5e62);
}

/* Contrôleur de largeur du conteneur */
#containerWidthControl {
	width: 100px;
	height: 6px;
	cursor: pointer;
}

.box {
	padding: 25px;
	margin: 5px 0;
	background: white;
	border: none;
	border-radius: 15px;
	min-height: 200px;
	transition: all 0.3s ease;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	position: relative;
	overflow: hidden;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.box::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 5px;
	height: 100%;
	background: linear-gradient(to bottom, #6e8efb, #a777e3);
}

.box-content {
	flex: 1;
	padding-right: 15px;
}

#questionText,
#answerText {
	font-size: 3rem;
	line-height: 1.2;
	margin-bottom: 0;
	color: #444;
	font-weight: 500;
}

.audio-controls {
	flex-shrink: 0;
}

.play-btn {
	padding: 10px 20px;
	background: linear-gradient(to right, #6e8efb, #a777e3);
	color: white;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 500;
	box-shadow: 0 4px 8px rgba(106, 142, 251, 0.3);
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.play-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(106, 142, 251, 0.4);
}

.image-container {
	text-align: center;
	margin: 25px 0;
	background: white;
	padding: 15px;
	border-radius: 15px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

#questionImage {
	max-width: 100%;
	max-height: 400px;
	/* border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  cursor: pointer; */
}

.grand-box {
	display: flex;
	gap: 20px;
	padding: 20px;
	background-color: #fff;
}

.box-question-reponse {
	display: flex;
	flex-direction: column;
	gap: 20px;
	flex: 1;
}

.box-image {
	flex: 1;
}

/* Overlay plein écran pour image */
#imageOverlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.9);
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

#imageOverlay img {
	max-width: 90%;
	max-height: 90%;
	border-radius: 10px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 30px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.navigation button:disabled {
	background: linear-gradient(to right, #cccccc, #aaaaaa);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	cursor: not-allowed;
	transform: none;
}

#counter {
	font-size: 18px;
	font-weight: bold;
	color: #6e8efb;
	background: #f0f4ff;
	padding: 8px 16px;
	border-radius: 50px;
}

/* Animation pour l'apparition des éléments */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.box,
.image-container {
	animation: fadeIn 0.5s ease forwards;
}

/* Responsive design */
@media (max-width: 600px) {
	.container {
		padding: 20px;
		border-radius: 6px;
	}
	.nav {
		align-items: center;
		padding: 5px 15px; /* Ajout de padding pour plus d'espace */
		margin-bottom: 10px;
	}
	.logo a {
		font-size: 1rem;
	}
	.logo a p {
		display: none;
	}
	.logo img {
		height: 50px; /* Ajustez la taille de l’image selon vos besoins */
	}
	h1 {
		font-size: 1.2rem;
		margin-bottom: 10px;
	}

	.controls {
		flex-direction: row;
		align-items: center;
		margin-bottom: 10px;
	}
	.controls-font-width {
		display: none;
	}

	.controls button {
		min-width: 100px;
		padding: 8px 12px;
		font-size: 13px;
		text-align: center;
		height: 40px;
		border-radius: 5px;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.box {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		margin: 10px 0;
		padding: 10px;
		min-height: 80px;
	}

	.box-content {
		padding-right: 0;
	}
	.box-question-reponse {
		gap: 5px;
	}

	.navigation {
		flex-direction: row;
		gap: 8px;
		margin-top: 10px;
		padding-top: 10px;
	}

	.navigation button {
		padding: 10px 20px;
		font-size: 13px;
	}

	#counter {
		order: -1;
		font-size: 16px;
	}
	.grand-box {
		flex-direction: column;
		gap: 5px;
		padding: 5px;
	}
	#questionText,
	#answerText {
		font-size: 16px !important;
	}

	.play-btn {
		padding: 5px 10px;
		border-radius: 4px;
		font-size: 11px;
	}

	.image-container {
		margin: 10px 0;
		padding: 10px;
		min-height: 280px;
	}
}
