/* =========================================================
   Compléments ajoutés lors de la refonte MVC.
   Le reste du style vient de style.css / login.css (originaux,
   inchangés) : palette, sidebar, bulles, header, input.
   ========================================================= */

/* Bouton « Nouvelle conversation » (libellé explicite) */
.btn-new-full {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 10px 12px 4px;
	padding: 10px 12px;
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	width: calc(100% - 24px);
	transition: background 0.2s;
}

.btn-new-full:hover {
	background: var(--accent-hover);
}

.btn-new-full .icon {
	font-size: 18px;
	line-height: 1;
}

/* Badge crédits & infos utilisateur (dans .header-right) */
.credits-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(0, 159, 227, 0.15);
	color: var(--accent);
	font-size: 12px;
	font-weight: 600;
}

.user-info {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.btn-logout {
	text-decoration: none;
	color: inherit;
}

/* Messages flash (dark theme) */
.flash {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 2000;
	max-width: 380px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.flash-success {
	background: #1a452a;
	color: #86efac;
	border: 1px solid #166534;
}

.flash-danger {
	background: #451a1a;
	color: #fca5a5;
	border: 1px solid #7f1d1d;
}

.flash-warning {
	background: #453a1a;
	color: #fcd34d;
	border: 1px solid #7f6b0f;
}

/* Le lien de déconnexion reste discret dans le header */
.header-right a {
	text-decoration: none;
}

/* Lien vers l'audit premium dans le header du chat */
.header-audit {
	text-decoration: none;
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	padding: 3px 10px;
	border: 1px solid rgba(0, 159, 227, .45);
	border-radius: 999px;
	transition: background .2s;
}

.header-audit:hover {
	background: rgba(0, 159, 227, .15);
}

/* Bandeau lecture seule (admin consultant la conversation d'un client) */
.chat-readonly {
	padding: 8px 16px;
	background: rgba(240, 180, 41, .14);
	border-bottom: 1px solid rgba(240, 180, 41, .35);
	color: #f0b429;
	font-size: 13px;
	text-align: center;
}

/* ---------- Glisser-déposer ---------- */
.dz {
	position: relative;
	border: 2px dashed var(--border-color);
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 14px;
	cursor: pointer;
	transition: border-color .15s, background .15s;
	background: rgba(255, 255, 255, .02);
}

.dz:hover { border-color: var(--accent); }

.dz.dz-over {
	border-color: var(--accent);
	background: rgba(0, 159, 227, .10);
}

.dz-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.dz-sub { font-size: 12.5px; color: var(--text-secondary); }
.dz-files { display: block; margin-top: 8px; font-size: 12.5px; color: var(--accent); }
.dz input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Messages flottants : disparition douce + bouton de fermeture */
.flash {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	transition: opacity .3s ease;
}

.flash-close {
	background: none;
	border: none;
	color: inherit;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	opacity: .7;
	padding: 0 2px;
}

.flash-close:hover { opacity: 1; }

/* ---------- Bouton flottant « remonter en haut » ---------- */
#backtop {
	position: fixed;
	right: 24px;
	bottom: 26px;
	z-index: 2500;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(0, 159, 227, .45);
	background: rgba(31, 31, 31, .92);
	color: var(--accent, #009fe3);
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s, transform .2s, visibility .2s, background .2s;
	backdrop-filter: blur(4px);
}

#backtop.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

#backtop:hover {
	background: rgba(0, 159, 227, .18);
}

@media print {
	#backtop { display: none; }
}
