* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Georgia', serif;
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	color: #2d2d2d;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 20px;
}

.container {
	max-width: 1400px;
	width: 100%;
	background: #ffffff;
	border-radius: 2px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	display: flex;
	flex-direction: row;
	height: 90vh;
	max-height: 800px;
}

.chat-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	border-right: 2px solid #e0e0e0;
}

.info-panel {
	width: 350px;
	background: #f8f9fa;
	overflow-y: auto;
	padding: 20px;
	font-family: 'Helvetica Neue', sans-serif;
}

.info-panel h3 {
	color: #0f3460;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
	margin-top: 20px;
	border-bottom: 2px solid #e94560;
	padding-bottom: 5px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.info-panel h3:first-child {
	margin-top: 0;
}

.info-panel h3 svg {
	flex-shrink: 0;
}

.info-panel p {
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 8px;
	color: #2d2d2d;
}

.info-panel ul {
	list-style: none;
	padding-left: 0;
	margin-bottom: 12px;
}

.info-panel li {
	font-size: 13px;
	line-height: 1.8;
	padding-left: 18px;
	position: relative;
	color: #2d2d2d;
}

.info-panel li:before {
	content: "•";
	position: absolute;
	left: 0;
	color: #0f3460;
	font-weight: bold;
}

.info-highlight {
	background: #fff3cd;
	border-left: 3px solid #ffc107;
	padding: 10px;
	margin: 10px 0;
	font-size: 12px;
	border-radius: 2px;
}

@media (max-width: 1200px) {
	.info-panel {
		width: 300px;
	}
}

@media (max-width: 900px) {
	.container {
		flex-direction: column;
		max-height: none;
		height: auto;
	}

	.chat-container {
		border-right: none;
		border-bottom: 2px solid #e0e0e0;
		height: 600px;
	}

	.info-panel {
		width: 100%;
		max-height: 400px;
	}
}

.header {
	background: #0f3460;
	color: #ffffff;
	padding: 25px 30px;
	border-bottom: 3px solid #e94560;
	display: flex;
	align-items: center;
	gap: 20px;
}

.logo-placeholder {
	width: 70px;
	height: 70px;
	min-width: 70px;
	border-radius: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.logo-placeholder img {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

.header-content {
	flex: 1;
}

.header h1 {
	font-size: 24px;
	font-weight: 600;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.header p {
	font-size: 14px;
	opacity: 0.9;
	font-family: 'Helvetica Neue', sans-serif;
}

.status-bar {
	background: #f8f9fa;
	padding: 15px 30px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #e0e0e0;
	font-family: 'Helvetica Neue', sans-serif;
}

.status-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555;
}

.status-badge {
	background: #0f3460;
	color: white;
	padding: 4px 12px;
	border-radius: 12px;
	font-weight: 600;
	font-size: 12px;
}

.chat-area {
	flex: 1;
	overflow-y: auto;
	padding: 30px;
	background: #fafafa;
}

.message {
	margin-bottom: 20px;
	display: flex;
	gap: 15px;
	animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.message.visitor {
	flex-direction: row;
}

.message.agent {
	flex-direction: row-reverse;
}

.avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	background: #0f3460;
	border: 2px solid #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar.agent-avatar {
	background: #e94560;
}

.message-content {
	max-width: 70%;
	background: white;
	padding: 15px 20px;
	border-radius: 2px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	font-family: 'Helvetica Neue', sans-serif;
	line-height: 1.6;
}

.message.visitor .message-content {
	background: #e3f2fd;
	border-left: 3px solid #0f3460;
}

.message.agent .message-content {
	background: #e8f5e9;
	border-right: 3px solid #e94560;
}

.message-meta {
	font-size: 11px;
	color: #999;
	margin-top: 5px;
	font-family: 'Helvetica Neue', sans-serif;
}

.input-area {
	background: white;
	padding: 20px 30px;
	border-top: 2px solid #e0e0e0;
}

.input-wrapper {
	display: flex;
	gap: 10px;
}

#userInput {
	flex: 1;
	padding: 12px 18px;
	border: 2px solid #d0d0d0;
	border-radius: 2px;
	font-size: 15px;
	font-family: 'Helvetica Neue', sans-serif;
	transition: border-color 0.3s;
}

#userInput:focus {
	outline: none;
	border-color: #0f3460;
}

button {
	padding: 12px 28px;
	background: #0f3460;
	color: white;
	border: none;
	border-radius: 2px;
	cursor: pointer;
	font-size: 15px;
	font-weight: 600;
	font-family: 'Helvetica Neue', sans-serif;
	transition: background-color 0.3s;
}

button:hover {
	background: #1a4d7a;
}

button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.voice-btn {
	padding: 4px 8px;
	margin-left: 10px;
	background: transparent;
	color: #0f3460;
	font-size: 12px;
}

.voice-btn:hover {
	background: #f0f0f0;
}

.modal {
	display: flex;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	justify-content: center;
	align-items: center;
}

.modal-content {
	background: white;
	padding: 40px;
	border-radius: 2px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	max-width: 500px;
	width: 90%;
	text-align: center;
}

.modal-content h2 {
	color: #0f3460;
	margin-bottom: 20px;
	font-size: 28px;
}

.modal-content input {
	width: 100%;
	padding: 12px;
	margin: 20px 0;
	border: 2px solid #d0d0d0;
	border-radius: 2px;
	font-size: 15px;
	font-family: 'Helvetica Neue', sans-serif;
}

.modal-content input:focus {
	outline: none;
	border-color: #0f3460;
}

.evaluation {
	background: white;
	padding: 15px;
	margin: 15px 0;
	border-radius: 2px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	border-left: 5px solid #0f3460;
	animation: fadeIn 0.5s ease;
}

.evaluation h2 {
	color: #0f3460;
	font-size: 20px;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.evaluation h3 {
	color: #0f3460;
	font-size: 14px;
	margin: 10px 0 8px 0;
}

.criterion {
	background: #f8f9fa;
	padding: 8px;
	margin: 6px 0;
	border-radius: 2px;
	border-left: 3px solid #0f3460;
	font-family: 'Helvetica Neue', sans-serif;
	line-height: 1.4;
	font-size: 13px;
}

.criterion strong {
	color: #0f3460;
	font-size: 14px;
}

.score {
	font-size: 36px;
	font-weight: bold;
	color: #0f3460;
	text-align: center;
	margin: 10px 0;
	padding: 10px;
	background: linear-gradient(135deg, #e8f4f8 0%, #f8f9fa 100%);
	border-radius: 2px;
}

.verdict {
	padding: 10px;
	border-radius: 2px;
	margin: 10px 0;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: 'Helvetica Neue', sans-serif;
}

.verdict.success {
	background: #d4edda;
	color: #155724;
	border-left: 5px solid #28a745;
}

.verdict.failure {
	background: #f8d7da;
	color: #721c24;
	border-left: 5px solid #dc3545;
}

.print-btn,
.restart-btn {
	width: 48%;
	margin: 10px 1%;
	padding: 12px;
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.restart-btn {
	background: #6c757d;
}

.restart-btn:hover {
	background: #5a6268;
}

.no-print {
	display: block;
}

/* ============================================
   OPTIMISATION IMPRESSION - 1 PAGE STRICTE
   ============================================ */
@media print {
	@page {
		size: A4;
		margin: 3mm;
	}

	body {
		background: white;
		padding: 0;
		margin: 0;
	}

	.container {
		box-shadow: none;
		height: auto;
		max-height: none;
		flex-direction: column;
		display: block;
	}

	.info-panel {
		display: none !important;
	}

	.chat-container {
		border-right: none;
		display: block;
	}

	/* Masquer tous les éléments de contrôle */
	.no-print,
	.print-hide,
	button,
	.input-area,
	.status-bar {
		display: none !important;
	}

	/* En-tête ultra compact */
	.header {
		padding: 1mm 2mm;
		page-break-after: avoid;
		border-bottom: 1px solid #e94560;
		background: #f8f9fa;
		display: flex;
		align-items: center;
		gap: 2mm;
	}

	.header h1 {
		font-size: 9pt;
		margin-bottom: 0;
	}

	.header p {
		font-size: 5pt;
		display: none;
	}

	.logo-placeholder {
		width: 18px;
		height: 18px;
		min-width: 18px;
	}

	/* Informations élève en haut */
	#printInfo {
		display: block !important;
		font-size: 6pt;
		color: #666;
	}

	/* Afficher le score résumé seulement à l'impression - EN PREMIER */
	.print-score-summary {
		display: block !important;
		width: 100%;
		margin-bottom: 2mm;
		page-break-after: avoid;
		break-inside: avoid;
		order: -1000;
	}

	.print-score-summary > div {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}

	/* Zone de chat en flexbox pour contrôler l'ordre */
	.chat-area {
		padding: 1mm;
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		align-content: flex-start;
		font-size: 5pt;
		line-height: 1.05;
	}

	/* Messages normaux en 2 colonnes */
	.message:not(.system) {
		width: 48.5%;
		display: flex;
		align-items: flex-start;
		break-inside: avoid;
		page-break-inside: avoid;
		margin-bottom: 0.5mm;
		gap: 0.5mm;
	}

	/* Masquer complètement le score détaillé du bas à l'impression */
	.score-detaille-ecran {
		display: none !important;
	}
	
	.message.system {
		display: none !important;
	}
	
	/* S'assurer que seul le score compact est visible */
	.print-score-summary {
		display: block !important;
		visibility: visible !important;
	}

	.avatar {
		width: 8px;
		height: 8px;
		font-size: 5px;
		flex-shrink: 0;
	}

	.avatar svg {
		width: 5px;
		height: 5px;
	}

	.message:not(.system) .message-content {
		padding: 0.8mm 1.2mm;
		font-size: 5pt;
		line-height: 1.1;
		max-width: 100%;
		box-shadow: none;
		border-radius: 1mm;
		flex: 1;
	}

	/* Styles pour messages spécifiques en impression */
	.message-content.success,
	.message-content.error,
	.message-content.system,
	.message-content.tourist,
	.message-content.welcome {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}

	/* Réduire les marges des listes */
	ul, ol {
		margin: 0.5mm 0;
		padding-left: 3mm;
	}

	li {
		margin: 0.2mm 0;
	}

	/* Réduire les marges des paragraphes */
	p {
		margin: 0.3mm 0;
	}

	/* Optimiser les divs internes */
	div[style*="padding"] {
		padding: 0.5mm !important;
	}

	div[style*="margin"] {
		margin: 0.5mm 0 !important;
	}
}

/* Styles pour les types de messages spécifiques */
.message-content.success {
	background: #c8e6c9 !important;
	border-left: 4px solid #4caf50 !important;
	font-weight: 600;
}

.message-content.error {
	background: #ffcdd2 !important;
	border-left: 4px solid #f44336 !important;
}

.message-content.system {
	background: #f5f5f5 !important;
	border-left: 4px solid #9e9e9e !important;
}

.message-content.welcome {
	background: #706f6d !important;
	border-left: 4px solid #181818 !important;
	color:white;
}

.message-content.tourist {
	background: #ffe0b2 !important;
	border-left: 4px solid #ff9800 !important;
}