:root {
	--lucie-primary: #4d6651;         /* Vert mousse foncé */
	--lucie-accent:  #7ba280;         /* Vert sauge doux */
	--lucie-user:    #accbb0;         /* Vert lichen clair */
	--lucie-bright-hover: #b1ddaa;    /* Hover pâle – accessible */
	--lucie-bg:      #e9f1ea;         /* Fond global très doux */
	--lucie-white:   #ffffff;
	--lucie-border:  #3a5240;         /* Bordures subtiles */
	--lucie-text:    #1d2e21;         /* Texte bien lisible */
}

/* ==== SCROLLBAR ==== */
::-webkit-scrollbar {
	width: 7px;
}
::-webkit-scrollbar-track {
	box-shadow: inset 0 0 5px var(--lucie-accent);
	border-radius: 3px;
}
::-webkit-scrollbar-thumb {
	background: var(--lucie-primary);
	border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
	background: var(--lucie-accent);
}

/* ==== BASE ==== */
body {
	font-family: 'Segoe UI', Calibri, sans-serif;
	margin: 0;
	padding: 0;
	background: linear-gradient(var(--lucie-accent), var(--lucie-primary));
	color: var(--lucie-text);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ==== HEADER ==== */
header {
	background: var(--lucie-primary);
	color: var(--lucie-white);
	padding: 10px 15px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.site-name {
	display: flex;
	align-items: center;
	gap: 10px;
}

.logo {
	height: 40px;
}

h1 {
	font-size: 25px;
	margin: 0;
}

/* ==== BACKGROUND SHAPES ==== */
.background-shapes {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
	z-index: -5;
}

.shape {
	position: absolute;
	opacity: 0.2;
	border-radius: 50%;
	animation: float 20s linear infinite;
}

.shape1 {
	width: 350px; height: 350px;
	top: 10%; left: -5%;
	animation-delay: 0s;
	background: var(--lucie-accent);
	box-shadow: 0 0 60px 20px var(--lucie-accent);
}

.shape2 {
	width: 40px; height: 40px;
	top: 70%; left: 80%;
	animation-delay: 5s;
	background: var(--lucie-primary);
	box-shadow: 0 0 60px 20px var(--lucie-white);
}

.shape3 {
	width: 200px; height: 200px;
	top: 90%; left: 80%;
	animation-delay: 10s;
	background: var(--lucie-primary);
	box-shadow: 0 0 60px 20px var(--lucie-white);
}

@keyframes float {
	0%   { transform: translateY(0px) translateX(0px) rotate(0deg); }
	25%  { transform: translateY(-60px) translateX(10px) rotate(90deg); }
	50%  { transform: translateY(-120px) translateX(-10px) rotate(180deg); }
	75%  { transform: translateY(-60px) translateX(10px) rotate(270deg); }
	100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

/* ==== CONTAINER ==== */
.main-container {
	display: flex;
	flex-direction: row;
	gap: 5px;
	padding: 5px;
	width: 90%;
	max-width: 1200px;
	margin: auto;
	flex: 1;
	box-sizing: border-box;
}

/* ==== CHAT ==== */
.chat-container {
	flex: 1;
	background: var(--lucie-bg);
	padding: 15px;
	border-radius: 20px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	display: flex;
	flex-direction: column;
	max-height: 85vh;
}

/* ==== MESSAGES ==== */
.messages {
	flex: 1;
	overflow-y: auto;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 10px;
}

.message {
	padding: 10px 15px;
	border-radius: 15px;
	max-width: 70%;
	font-size: 18px;
	line-height: 1.5;
	word-wrap: break-word;
	box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.user-message {
	background-color: var(--lucie-user);
	color: var(--lucie-text); /* contraste élevé */
	align-self: flex-end;
}

.ia-message {
	background-color: var(--lucie-border);
	color: var(--lucie-white); /* blanc sur foncé */
	align-self: flex-start;
}

.error-message {
	background-color: #e74c3c;
	color: var(--lucie-white);
	text-align: center;
	font-weight: bold;
	padding: 10px 15px;
	border-radius: 15px;
}

/* ==== ATTENTE ==== */
#waiting-indicator {
	display: none;
	text-align: center;
	font-size: 14px;
	font-style: italic;
	color: #646464;
	margin-bottom: 10px;
}

/* ==== FORMULAIRE ==== */
.chat-form {
	display: flex;
	flex-direction: column;
	padding-top: 10px;
}

#message-input {
	padding: 10px;
	border-radius: 30px;
	border: 0.5px solid var(--lucie-primary);
	font-size: 16px;
	margin-bottom: 10px;
	background-color: var(--lucie-accent);
	color: var(--lucie-white);
}

.button-container {
	display: flex;
	gap: 10px;
}

button {
	flex: 1;
	background-color: var(--lucie-primary);
	color: var(--lucie-white);
	padding: 10px 15px;
	border: none;
	border-radius: 20px;
   	font-size: 16px;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

button:hover {
	background-color: var(--lucie-user);
	color: var(--lucie-text);
}

/* ==== RESPONSIVE ==== */
@media screen and (max-width: 768px) {
	.main-container {
		flex-direction: column;
		width: 95%;
		padding: 5px;
	}

	.chat-container {
		width: 100%;
		padding: 5px 5px;
		border-radius: 15px;
	}

	.message {
		font-size: 20px;
	}

	h1 {
		font-size: 25px;
	}
}
